package com.spring.factory;

import com.spring.dao.Impl.UserDaoImpl;
import com.spring.dao.UserDao;
import org.springframework.beans.factory.FactoryBean;

/**
 * @author:CoolTiger
 * @description: TODO
 * @date:2024/04/24/23:59:23
 **/
public class UserDaoFactoryBean implements FactoryBean<UserDao> {

    //代替原始实例工厂中创建对象的方法
    @Override
    public UserDao getObject() throws Exception {
        return new UserDaoImpl();
    }

    @Override
    public Class<?> getObjectType() {
        return UserDao.class;
    }
}